<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex myhb_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center myhb_fd0_0'>
				</view>
				<text class='myhb_fd0_1'>个人中心</text>
				<view class='flex flex-wrap align-center justify-end myhb_fd0_2'>
				</view>
				<image src="https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/31.png" mode=""></image>
			</view>
			<!-- <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view> -->
			<view class="flex benben-flex-layout flex-wrap align-center myhb_flex_1">
				<image src="https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/31.png" mode=""></image>
				<view class='flex flex-wrap align-center self-center justify-center myhb_fd1_0' @click="nextpage(1)" v-if="islogin">
					<view class='flex flex-direction flex-wrap align-center justify-center myhb_fd1_0_c0'>
						<view class='flex flex-wrap align-center justify-center myhb_fd1_0_c0_c0'>
							<view class='flex flex-wrap align-center justify-center myhb_fd1_0_c0_c0_c0' v-if="user_info.userlevel_name">
								<text class='myhb_fd1_0_c0_c0_c0_c0'>{{user_info.userlevel_name}}</text>
								<!-- <text class='myhb_fd1_0_c0_c0_c0_c0'>法律工作者</text> -->
							</view>
							<image class='myhb_fd1_0_c0_c0_c1' mode="aspectFill" :src='user_info.avatar'></image>
						</view>
						<view class='flex flex-wrap align-center' style="position: relative;z-index: 999;">
							<text class='myhb_fd1_0_c0_c1_c0'>{{user_info.nickname}}</text>
						</view>
						<view class='flex flex-wrap align-center' style="position: relative;z-index: 999;">
							<text class='myhb_fd1_0_c0_c2_c0'>{{user_info._mobile}}</text>
						</view>
					</view>
				</view>
				<view class='flex flex-wrap align-center self-center justify-center myhb_fd1_0' @click="nextpage(1)" v-else>
					<view class='flex flex-direction flex-wrap align-center justify-center myhb_fd1_0_c0'>
						<view class='flex flex-wrap align-center justify-center myhb_fd1_0_c0_c0'>
							<!-- <view class='flex flex-wrap align-center justify-center myhb_fd1_0_c0_c0_c0'>
								<text class='myhb_fd1_0_c0_c0_c0_c0'>{{user_info.userlevel_name}}</text>
							</view> -->
							<image class='myhb_fd1_0_c0_c0_c1' mode="aspectFill" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/32.png'></image>
						</view>
						<view class='flex flex-wrap align-center' style="position: relative;z-index: 999;">
							<text class='myhb_fd1_0_c0_c1_c0'>请登录</text>
						</view>
					</view>
				</view>
			</view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center">
				<view class='flex flex-wrap align-center myhb_fd2_0' v-if="web_site_status==1">
					<view class='flex flex-wrap align-center myhb_fd2_0_c0'>
						<view class='flex flex-wrap align-center justify-between myhb_fd2_0_c0_c0'>
							<view class='flex flex-wrap align-center'>
								<text class='myhb_fd2_0_c0_c0_c0_c0'>法豆余额</text>
							</view>
							<view class='flex flex-wrap align-center' @click="nextpage(2)">
								<text class='myhb_fd2_0_c0_c0_c1_c0'>查看明细</text>
								<!-- <text class='fu-iconfont2  myhb_fd2_0_c0_c0_c1_c1'>&#xe7f2;</text> -->
								<image class='myhb_fd2_0_c0_c0_c1_c1' src="https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/77.png" mode=""></image>
							</view>
						</view>
						<view class='flex flex-wrap align-center justify-between myhb_fd2_0_c0_c1'>
							<view class='flex flex-wrap align-center' @click="nextpage(3)">
								<text class='myhb_fd2_0_c0_c1_c0_c0'>{{user_info.fadou}}</text>
							</view>
							<view class='flex flex-wrap align-center justify-center myhb_fd2_0_c0_c1_c1' @click="nextpage(4)">
								<text class='myhb_fd2_0_c0_c1_c1_c0'>充值法豆</text>
							</view>
						</view>
					</view>
				</view>
				<view class='flex align-stretch myhb_fd2_1'>
					<view class='flex flex-direction align-stretch myhb_fd2_0_c0'>
						<view class='flex flex-wrap align-center myhb_fd2_1_c0_c0'>
							<text class='myhb_fd2_1_c0_c0_c0'>我的发布</text>
						</view>
						<view class='flex flex-wrap align-center justify-around myhb_fd2_1_c0_c1'>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(5)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.shenheCount">
									<text>{{user_info.shenheCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/33.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>审核中</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(6)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.jujueCount">
									<text>{{user_info.jujueCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/34.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>已拒绝</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(7)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.fabuCount">
									<text>{{user_info.fabuCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/35.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>发布中</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(8)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.delCount">
									<text>{{user_info.delCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/36.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>已删除</text>
							</view>
						</view>
					</view>
				</view>
				<view class='flex align-stretch myhb_fd2_1'>
					<view class='flex flex-direction align-stretch myhb_fd2_0_c0'>
						<view class='flex flex-wrap align-center myhb_fd2_1_c0_c0'>
							<text class='myhb_fd2_1_c0_c0_c0'>其他功能</text>
						</view>
						<view class='flex flex-wrap align-center justify-around myhb_fd2_1_c0_c1'>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(1)">
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/37.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>个人资料</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(9)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.chakanCount">
									<text>{{user_info.chakanCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/38.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>我的查看</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(10)">
								<view class='flex align-center justify-center myhb_fd2_1_c0_c1_c0_c0' v-if="user_info.jingpaiCount">
									<text>{{user_info.jingpaiCount}}</text>
								</view>
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/39.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>我的竞拍</text>
							</view>
							<view class='flex flex-direction flex-wrap align-center myhb_fd2_1_c0_c1_c0' @click="nextpage(11)">
								<image class='myhb_fd2_1_c0_c1_c0_c1' mode="aspectFit" src='https://paiaifalv.oss-cn-beijing.aliyuncs.com/images/40.png'>
								</image>
								<text class='myhb_fd2_1_c0_c1_c0_c2'>设置</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!---flex布局flex布局结束-->
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},
		data() {
			return {
				"user_info": {
					"invite_code": "",
					"address": "",
					"address_code": "",
					"hobby": "",
					"tags": "",
					"id": "",
					"userlevel_id": "",
					"mobile": "",
					"real_name": "",
					"avatar": "",
					"account": "",
					"email": "",
					"birthday": "",
					"gender": "",
					"create_time": "",
					"user_money": "",
					"freeze_money": "",
					"total_consumption_money": "",
					"score": "",
					"_mobile": "",
					"coupon": "",
					"total_money": "",
					"certified": "",
					"nickname": "",
					"is_pay_password": "",
					"is_close": ""
				},
				islogin:false,//登录状态
				web_site_status:"0",//上架信息
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.get_config();
			if(uni.getStorageSync("token")){
				this.islogin = true;
				this.get_user_infoFunc() //获取个人信息
			}else{
				this.islogin = false;
				this.user_info={
					"invite_code": "",
					"address": "",
					"address_code": "",
					"hobby": "",
					"tags": "",
					"id": "",
					"userlevel_id": "",
					"mobile": "",
					"real_name": "",
					"avatar": "",
					"account": "",
					"email": "",
					"birthday": "",
					"gender": "",
					"create_time": "",
					"user_money": "",
					"freeze_money": "",
					"total_consumption_money": "",
					"score": "",
					"_mobile": "",
					"coupon": "",
					"total_money": "",
					"certified": "",
					"nickname": "",
					"is_pay_password": "",
					"is_close": ""
				}
			}
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取配置信息
			get_config(){
				this.$api.post(global.apiUrls.get_config, {
				}).then(res => {
					if (res.data.code == 1) {
						this.web_site_status = res.data.data.web_site_status;
					}
				})
			},
			
			//获取会员详细信息
			async get_user_infoFunc() {
				//请求方法
				//数据验证
				let datauser_info = await this.$api.get(global.apiUrls.post5c78c4772da97, {
				});
				if (datauser_info.data.code != 1) {
					this.$message.info(datauser_info.data.msg);
					return
				}
				let infouser_info = datauser_info.data;
				this.user_info = infouser_info.data
			},
			
			//跳转下级页面
			nextpage(index){
				if(!uni.getStorageSync("token")){
					this.$message.info("请先登录")
					uni.navigateTo({
						url:"/pages/tabBar/denglu/denglu"
					})
					return
				}
				if(index==1){
					uni.navigateTo({
						url:"/pages/grzx/myInfo/myInfo"
					})
				}else if(index==2){
					//查看明细
					uni.navigateTo({
						url:"/pages/qbgl/balanceDetail/balanceDetail"
					})
				}else if(index==3){
					//查看明细
					uni.navigateTo({
						url:"/pages/qbgl/myWalletPage/myWalletPage"
					})
				}else if(index==4){
					//充值
					uni.navigateTo({
						url:"/pages/qbgl/balanceRecharge/balanceRecharge"
					})
				}else if(index==5){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/myfabu/myfabu?state="+0
					})
				}else if(index==6){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/myfabu/myfabu?state="+1
					})
				}else if(index==7){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/myfabu/myfabu?state="+2
					})
				}else if(index==8){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/myfabu/myfabu?state="+3
					})
				}else if(index==9){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/mychakan/mychakan"
					})
				}else if(index==10){
					//我的发布
					uni.navigateTo({
						url:"/pages/grzx/myjinpai/myjinpai"
					})
				}else if(index==11){
					//我的发布
					uni.navigateTo({
						url:"/pages/xtsz/system/system"
					})
				}
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #eee;
		background-size: 100% auto;
	}

	.myhb_flex_0 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
		position: relative;
	}

	.myhb_flex_0 image {
		width: 100%;
		height: 100%;
		position: absolute;
		left: 0;
		top: 0;
	}

	.myhb_fd0_2 {
		width: 200rpx;
		height: 88rpx;
		position: relative;
	}

	.myhb_fd0_1 {
		color: var(--benbenFontColor3);
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.myhb_fd0_0 {
		width: 200rpx;
		height: 88rpx;
	}

	.myhb_flex_1 {
		// background: url(image-path('31.png')) no-repeat;
		background-size: 100% auto !important;
		position: relative;
	}

	.myhb_flex_1 image {
		width: 100%;
		height: 100%;
		position: absolute;
		left: 0;
		top: 0;
	}

	.myhb_fd1_0_c0_c2_c0 {
		color: #FFFFFF;
		font-size: 24rpx;
		font-weight: 400;
		margin: 10rpx 0rpx 46rpx 0rpx;
	}

	.myhb_fd1_0_c0_c1_c0 {
		color: #FFFFFF;
		font-size: 36rpx;
		font-weight: 600;
		margin: 34rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd1_0_c0_c0_c1 {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50rpx;
	}

	.myhb_fd1_0_c0_c0_c0_c0 {
		color: #FFFFFF;
		font-size:22rpx;
		font-weight: 400;
	}

	.myhb_fd1_0_c0_c0_c0 {
		background: linear-gradient(320deg, #26BF01 0%, #01BF85 100%);
		border-radius: 14rpx;
		width:140rpx;
		height: 32rpx;
		position: absolute;
		bottom: -8rpx;
		z-index: 9;
		line-height:32rpx;
		padding: 0 12rpx 0 12rpx;
	}

	.myhb_fd1_0_c0_c0 {
		border: 2px solid rgba(255, 255, 255, 1);
		width: 100rpx;
		height: 100rpx;
		border-radius: 50rpx;
		position: relative;
	}

	.myhb_fd1_0_c0 {
		margin: 140rpx 0rpx 46rpx 0rpx;
		width: 400rpx;
	}

	.myhb_fd1_0 {
		width: 100%;
	}

	.myhb_fd2_1_c0_c1_c0_c2 {
		color: #1A1A1A;
		font-size: 30rpx;
		font-weight: 500;
		padding: 8rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_1_c0_c1_c0_c1 {
		width: 80rpx;
		height: 80rpx;
		border-radius: 40rpx;
	}

	.myhb_fd2_1_c0_c1_c0_c0 {
		background: rgba(252, 50, 39, 1);
		width: 32rpx;
		height: 32rpx;
		background-size: 100% auto;
		color: var(--benbenFontColor3);
		border-radius: 16rpx;
		position: absolute;
		right: 0rpx;
		top: 0rpx;
	}

	.myhb_fd2_1_c0_c1_c0 {
		position: relative;
	}

	.myhb_fd2_1_c0_c1 {
		margin: 26rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_1_c0_c0_c0 {
		color: #1A1A1A;
		font-size: 32rpx;
		font-weight: 500;
		margin: 36rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_1_c0_c0 {
		width: 100%;
	}

	.myhb_fd2_1 {
		background: #FFFFFF;
		height: 260rpx;
		width: 100%;
		margin: 20rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_0_c0_c1_c1_c0 {
		color: #FFFFFF;
		font-size: 30rpx;
		font-weight: 400;
	}

	.myhb_fd2_0_c0_c1_c1 {
		background: #26BF01;
		border-radius: 8rpx;
		width: 135rpx;
		height: 56rpx;
	}

	.myhb_fd2_0_c0_c1_c0_c0 {
		color: #1A1A1A;
		font-size: 64rpx;
		font-weight: 700;
	}

	.myhb_fd2_0_c0_c1 {
		width: 100%;
		margin: 40rpx 0rpx 34rpx 0rpx;
	}

	.myhb_fd2_0_c0_c0_c1_c1 {
		color: rgba(38, 191, 1, 1);
		font-weight: 500;
		width:36rpx;
		height:36rpx;
		position: relative;
		top:2rpx;
	}

	.myhb_fd2_0_c0_c0_c1_c0 {
		color: #26BF01;
		font-size: 30rpx;
		font-weight: 400;
	}

	.myhb_fd2_0_c0_c0_c0_c0 {
		color: #333333;
		font-size: 30rpx;
		font-weight: 400;
	}

	.myhb_fd2_0_c0_c0 {
		width: 100%;
		margin: 20rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_0_c0 {
		width: 690rpx;
		margin: 0rpx 0rpx 0rpx 30rpx;
	}

	.myhb_fd2_0 {
		background: #fff;
		width: 100%;
		background-size: 100% auto;
	}
</style>